package com.yidong;

import com.YDCommonUtils;
import com.yidong.entity.YiDongObj;

/**
 * 询价
 */
public class Xunjia extends YDCommonUtils {

    public static String inPath = "D:\\code\\Projects\\yidong\\src\\main\\java\\com\\yidongcfg\\询价模板\\";
//    public static String inPath = "models\\询价模板\\";
    public static String outPath = "D:\\code\\Projects\\yidong\\src\\main\\java\\com\\yidongcfg\\";

    //后向询价文件
    public void xunjia(){
        Xunjia xunjia = new Xunjia();
        YiDongObj obj = new YiDongObj();

        xunjia.wordUtils(obj,inPath,outPath,"询价文件.docx","后向");

    }

    //后向比选文件
    public void bixuan(){
        Xunjia xunjia = new Xunjia();
        YiDongObj obj = new YiDongObj();

        xunjia.wordUtils(obj,inPath,outPath,"比选文件.docx","后向");

    }

    @Override
    public String changeText(String runText, YiDongObj obj) {
        runText = runText.replaceAll("易项目名称易",obj.getXmmc());
        runText = runText.replaceAll("易最高限价易",obj.getZgxj());
        runText = runText.replaceAll("易合同期限易",obj.getHtqx());
        runText = runText.replaceAll("易工期易",obj.getGq());
        runText = runText.replaceAll("易付款方式易",obj.getFkfs());
        runText = runText.replaceAll("易详细限价易",obj.getXxxj());
        runText = runText.replaceAll("易项目简介易",obj.getXmjj());
        return runText;
    }


}
